# -*- coding: UTF-8 -*-
"""
@author: tgy
@file: 1.3 保留最后 N 个元素.py
@time: 2021/01/13
"""
from collections import deque

if __name__ == '__main__':
    pass
    queue = deque(maxlen=2)
    queue.append(1)
    queue.append(2)
    queue.append(3)
    print(queue)
